using Common.NotifyEvent;

namespace Common
{
	public class SLANClipboard : NotifyPropertyChanged
	{
		private object _FieldName = "";

		private object _Data;

		public object FieldName
		{
			get
			{
				return _FieldName;
			}
			set
			{
				if (_FieldName != value)
				{
					_FieldName = value;
					OnPropertyChanged("FieldName");
				}
			}
		}

		public object Data
		{
			get
			{
				return _Data;
			}
			set
			{
				if (_Data == null || _Data != value)
				{
					_Data = value;
					OnPropertyChanged("Data");
				}
			}
		}

		public static void SetToClipboard(string text)
		{
			for (int i = 0; i < 10; i++)
			{
				try
				{
					Utility.CopyDataToClipboard(text);
					break;
				}
				catch
				{
				}
			}
		}
	}
}
